package com.Day1008;

import java.util.Comparator;

public class MyComparator implements Comparator<Student> {

    @Override
    public int compare(Student o1, Student o2) {
        if (o1.getAge() < o2.getAge()){
            return -1;
        }
        return 0;
    }

    public int add(int a,int b){
        return a+b;
    }
    //(int a,int b)-> a+b;

    public void print(String name){
        System.out.println(name);
    }
    //name -> System.out.println(name);

}
